file(GLOB TESTS_SOURCES_FILES ${PROJECT_SOURCE_DIR}/test/*.cpp)
foreach (TESTS_EXE ${TESTS_SOURCES_FILES})
        get_filename_component(TESTS_EXE_NAME ${TESTS_EXE} NAME_WE)
        message(STATUS "TESTS_EXE_NAME:${TESTS_EXE_NAME} ${TESTS_EXE}")
        add_executable(${TESTS_EXE_NAME} ${TESTS_EXE})

        if (CMAKE_SYSTEM_NAME MATCHES "Linux")
                add_definitions(-D __linux__)
                target_link_libraries(${EXECUTABLE_NAME} libserv pthread)
        elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
                add_definitions(-D __WIN32)
                target_link_libraries(${EXECUTABLE_NAME} libserv_static)
        endif ()
endforeach()
